Skip to content

Retain form params through duplicate check interstitial pages#1023

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/fix-dupe-check-interstitial-params
Closed

Retain form params through duplicate check interstitial pages#1023
Copilot wants to merge 2 commits intomainfrom
copilot/fix-dupe-check-interstitial-params

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 15, 2026

Superseded by a new PR from branch maebeale/fix-dupe-interstitial which uses the simpler render approach instead of session storage.

Copilot AI changed the title [WIP] Fix issue with dupe check interstitial pages for user creation Retain all form params in duplicate check interstitial pages Feb 15, 2026
Copilot AI requested a review from maebeale February 15, 2026 14:28
@maebeale maebeale marked this pull request as ready for review February 15, 2026 21:33
@maebeale maebeale force-pushed the copilot/fix-dupe-check-interstitial-params branch from 669bfed to e34c1b3 Compare February 17, 2026 05:51
@maebeale maebeale changed the title Retain all form params in duplicate check interstitial pages HOLD: Retain all form params in duplicate check interstitial pages Feb 17, 2026
@maebeale maebeale force-pushed the copilot/fix-dupe-check-interstitial-params branch 2 times, most recently from 4c1630d to fe46c56 Compare March 8, 2026 02:22
@maebeale maebeale changed the title HOLD: Retain all form params in duplicate check interstitial pages Retain form params through duplicate check interstitial pages Mar 8, 2026
Store all form params in session before redirecting to check_duplicates
so that 'Go Back' and 'Create Anyway' preserve the complete form data.

- Store person/user params in session before dupe check redirect
- Clear session on successful save
- Add hidden_fields_for_params helper for recursive hidden field rendering
- Use stored params for Go Back link and Create Anyway form
- Fall back to basic params when session is empty (backwards compat)
- Update test expectations for capitalized button text
@maebeale maebeale force-pushed the copilot/fix-dupe-check-interstitial-params branch from fe46c56 to 8dad714 Compare March 8, 2026 10:28
Verify that POST to people/users renders check_duplicates inline
instead of redirecting, preserves form params as hidden fields,
and allows creation when skip_duplicate_check is set.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@maebeale maebeale force-pushed the copilot/fix-dupe-check-interstitial-params branch from 8dad714 to 686bb34 Compare March 8, 2026 10:34
@maebeale maebeale changed the title Retain form params through duplicate check interstitial pages SUPERSEDED: Retain form params through duplicate check interstitial pages Mar 8, 2026
@maebeale
Copy link
Copy Markdown
Collaborator

maebeale commented Mar 8, 2026

from claude:

I’d stick with the full render. 
The interstitial is a distinct decision point — “review these duplicates, then choose” — not an inline update to the form. 
Turbo Streams shine for partial page updates (flash messages, replacing a single row), 
but here the entire page content changes to a different layout (centered card vs. the form).

Also practical reasons:

- The “Go back” link navigates to new_person_path with params — a full page load either way
- The “Create anyway” form already uses data: { turbo: false } because it’s a standard POST that should redirect on success
- Adding Turbo Frames would mean wrapping the new form and the interstitial in matching frames, 
plus handling the layout difference — more complexity for no UX gain
- The render approach is the simplest thing that works correctly here.

@maebeale maebeale changed the title SUPERSEDED: Retain form params through duplicate check interstitial pages Retain form params through duplicate check interstitial pages Mar 8, 2026
@maebeale maebeale requested a review from jmilljr24 March 8, 2026 18:26
@maebeale maebeale closed this Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants